// HelloWorld.Vue
<template>
  <div>
    <TestDataStore></TestDataStore>
    <TestSrc></TestSrc>
  </div>
</template>
<script>
export default {
  name: 'HelloWorld',
  components: {
    // TestWS:()=>{ return import('./testWS') },
    TestDataStore: () => {
      return import('./dataStore.vue');
    },
    TestSrc: () => {
      return import('./testSrc/testSrc.vue');
    },
  },
  data() {
    return {
      isDev: process.env.NODE_ENV == 'development',
      objqs: { a: 1, b: 2 },
    };
  },
  methods: {
    test: function() {
      console.log('this.$route', this.$route);
      console.log(this);
      this.$api.testGet().then((res) => {
        console.log(res);
      });
    },
  },
  beforeCreate: function() {
    console.log('实例初始化之后，数据观测和事件绑定之前');
  },
  created: function() {
    console.log('实例初始化完成，挂载尚未开始时');
  },
  beforeMount: function() {
    console.log('挂载之前，rander函数首次被调用时');
  },
  mounted: function() {
    console.log('在实例挂载到DOM节点上之后');
  },
  beforeUpdate: function() {
    console.log('数据更新时，在虚拟DOM状态变化之前');
  },
  updated: function() {
    console.log('虚拟DOM被重新渲染之后');
  },
  beforeDestroy: function() {
    console.log('实例销毁之前，此时实例依然可用');
  },
  destroyed: function() {
    console.log('实例销毁后，此时实例及其子实例将完全解绑');
  },
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped></style>
